package com.example.common.constant;

import lombok.Getter;

/**
 * <p>
 *
 * </p>
 *
 * @author zyred
 * @since v 0.1
 **/
@Getter
public enum BizCodeEnum {

    NONE_EXCEPTION(200, "操作成功"),
    USER_EXIST_EXCEPTION(500, "用户已存在"),
    TO_MANY_REQUEST(500, "请求流量过大"),
    PHONE_EXIST_EXCEPTION(500, "手机号已经注册"),
    USER_PASSWORD_ERROR(500, "账号或密码错误!"),
    PHONE_FORMAT_EXCEPTION(500, "手机号错误"),

    ORDER_SUCCESS(0, "操作成功"),
    ORDER_TOKEN_INSPECT_ERROR(1, "token校验失败！"),
    ORDER_AMOUNT_INSPECT_ERROR(2, "金额对比失败！"),
    ORDER_LOCK_STOCK_EXCEPTION(3, "锁定库存失败");

    private final int code;
    private final String msg;

    BizCodeEnum(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

}
